cmake_minimum_required(VERSION 3.10.2)

project(mydecoder)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -g -Wall -Werror -Wno-deprecated")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -DDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")

set(ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(OUTPUT_DIR "${ROOT_DIR}/output")
set(EXTRA_DIR "${ROOT_DIR}/../extra")

if(CMAKE_SYDTEM_NAME STREQUAL "iOS")

elseif(CMAKE_SYDTEM_NAME STREQUAL "Android")

endif()

set(SRC_LIST
    *
)

if(CMAKE_SYDTEM_NAME STREQUAL "iOS")
    add_library(mydecoder STATIC ${SRC_LIST})

    install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ios"
        DESTINATION "${IOS_PRODUCT_PATH}/Headers/"
        FILES_MATCHING
        PATTERN "*.H*"    
    )   
elseif(CMAKE_SYDTEM_NAME STREQUAL "Android")
    add_library(mydecoder SHARED ${SRC_LIST})
endif()